package com.wyt.dao;

import com.wyt.entity.Purchase1;
import com.wyt.entity.PurchaseDetail1;

import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PurchaseMapper1 {
    int deleteByPrimaryKey(Integer pid);

    int insert(Purchase1 record);

    int insertSelective(Purchase1 record);

    Purchase1 selectByPrimaryKey(Integer pid);

    int updateByPrimaryKeySelective(Purchase1 record);

    int updateByPrimaryKey(Purchase1 record);

    List<Purchase1> findAllPurchase(@Param("beginTime") String beginTime,@Param("endTime") String endTime);

    List<Purchase1> selectAllPurchaseCheck(@Param("pname") String pname, @Param("ename") String ename, @Param("beginTime") String beginTime, @Param("endTime") String endTime);

    List<Purchase1> selectAllReject(@Param("ename") String ename, @Param("beginTime") String beginTime, @Param("endTime") String endTime);

    List<Purchase1> queryAllIns(@Param("pname") String pname, @Param("ename") String ename, @Param("beginTime") String beginTime, @Param("endTime") String endTime);

    int Pinsert(Purchase1 purchase);

    int updateStatusReject(@Param("status") Integer status, @Param("pid") Integer pid,@Param("eid") Integer eid,@Param("ename") String ename,@Param("edate") String edate);

    PurchaseDetail1 findAllByPid(Integer pid);

    //查询所有待入库申请

    List<Purchase1> queryAllIns1(@Param("pname") String pname, @Param("rname") String rname);

    int  updateStatus(Integer pid);
}